<?php
require('header.php');
require('paginator.class.php');
requireAuth();
?>
<?php if($_SESSION['cs_user_authorized'] == 'YES'): ?>
<div class="row">
          <!-- Page Post -->
          <div class="col-lg-3">
            <div class="panel panel-default">
              <div class="panel-heading dsb">
                <div class="row">
                  <div class="col-xs-4">
                    <i class="glyphicon glyphicon-file glyphicon-lg"></i>
                  </div>
                  <div class="col-xs-8 text-right">
		            <?php $totalPagePost = totalPagePostByUser($userId) ?>
                    <p class="announcement-heading"><?php echo number_format($totalPagePost) ?></p>
                    <p class="loud">Page post</p>
                  </div>
                </div>
              </div>
              <a href="<?php echo route('page') ?>">
                <div class="panel-footer announcement-bottom">
                  <div class="row">
                    <div class="col-xs-6">
                      Add new post
                    </div>
                    <div class="col-xs-6 text-right">
                      <i class="glyphicon glyphicon-plus"></i>
                    </div>
                  </div>
                </div>
              </a>
            </div>
          </div>
		  <!--/ Page Post -->
		  <!-- Group Post -->
          <div class="col-lg-3">
            <div class="panel panel-default">
              <div class="panel-heading dsb">
                <div class="row">
                  <div class="col-xs-4">
                    <i class="glyphicon glyphicon-folder-open glyphicon-lg"></i>
                  </div>
                  <div class="col-xs-8 text-right">
		            <?php $totalGroupPost = totalGroupPostByUser($userId) ?>
                    <p class="announcement-heading"><?php echo number_format($totalGroupPost) ?></p>
                    <p class="loud">Group post</p>
                  </div>
                </div>
              </div>
              <a href="<?php echo route('group') ?>">
                <div class="panel-footer announcement-bottom">
                  <div class="row">
                    <div class="col-xs-6">
                      Add new post
                    </div>
                    <div class="col-xs-6 text-right">
                      <i class="glyphicon glyphicon-plus"></i>
                    </div>
                  </div>
                </div>
              </a>
            </div>
          </div>
          <!--/ Group Post -->
      </div>
  <?php endif; ?>
<?php require('footer.php') ?>